import request from '@/utils/request'

// 查询返修退料列表
export function listReturn(query) {
  return request({
    url: '/rr/return/list',
    method: 'get',
    params: query
  })
}

// 查询返修退料详细
export function getReturn(orderId) {
  return request({
    url: '/rr/return/' + orderId,
    method: 'get'
  })
}

// 新增返修退料
export function addReturn(data) {
  return request({
    url: '/rr/return',
    method: 'post',
    data: data
  })
}

// 修改返修退料
export function updateReturn(data) {
  return request({
    url: '/rr/return',
    method: 'put',
    data: data
  })
}

// 删除返修退料
export function delReturn(orderId) {
  return request({
    url: '/rr/return/' + orderId,
    method: 'delete'
  })
}

//执行出库
export function execute(orderId) {
  return request({
    url: '/rr/return/execute/' + orderId,
    method: 'get'
  })
}

//确认
export function confirmStatus(orderId) {
  return request({
    url: '/rr/return/confirmStatus/' + orderId,
    method: 'get'
  })
}
